
public abstract class XPlugin : XEventDispatcher
{
    /// <summary>
    /// Rewritten system loading interface to add an automatic registration RPC interface
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <returns></returns>
    public override T Load<T>()
    {
        T plugin = base.Load<T>();
        XNetRpc.GenerateClientProtocolMethod(plugin);

        return plugin;
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public override void Unload<T>()
    {
        XNetRpc.RemoveClientProtocolMethod(typeof(T));

        base.Unload<T>();
    }

    /// <summary>
    /// install plugin internal resources
    /// </summary>
    /// <returns></returns>
    public abstract bool Install();

    /// <summary>
    /// uninstall plugin internal resuources
    /// </summary>
    public abstract void Uninstall();
}

